package com.fdc_project.controller;


import com.fdc_project.entity.Productinformation;
import com.fdc_project.service.impl.ProductinformationServiceImpl;
import com.fdc_project.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Sk
 * @since 2021-11-29
 */
@RestController
@RequestMapping("/productinformation")
public class ProductinformationController {

    @Autowired
    ProductinformationServiceImpl productinformationService;

    @PostMapping("/add")
    public Result proAdd(@RequestBody Productinformation productinformation){ return productinformationService.add(productinformation);}

    @PostMapping("/delete")
    public Result proDelete(@RequestBody  Integer id){return productinformationService.delete(id);}

    @PostMapping("/update")
    public Result proUpdate(@RequestBody Productinformation productinformation){return productinformationService.update(productinformation);}

    @PostMapping("/selectone")
    public Result proSelectone(@RequestBody Integer id){return productinformationService.seletone(id);}

    @PostMapping("/selectall")
    public Result proSelectAll(){return productinformationService.seletcall();}


}

